package org.obsidianrad.utils;


import java.io.Serializable;

import org.obsidianrad.server.services.ObsModel;

/**
 * 
 * @author Eligio Colutta
 * @version $Rev: 4 $
 * @lastautorcommit $Author: eliosh $
 * @lastdatecommit $Date: 2009-10-31 12:37:28 +0100(sab, 31 ott 2009) $
 */
public class Token<T extends ObsModel> implements Serializable {

	private static final long serialVersionUID = 3833666817275465811L;
	
	private long lastDate;
	private long randomKey;
	private T clazz;
	private String pKey;
	
	public Token(){
		
	}
	
	public Token(T reference, long randomKey, String pKey) {
		super();
		this.lastDate = System.currentTimeMillis();
		this.randomKey = randomKey;
		this.clazz = reference;
		this.pKey = pKey;
	}

	/**
	 * @return the lastDate
	 */
	public long getLastDate() {
		return lastDate;
	}

	/**
	 * @param lastDate the lastDate to set
	 */
	public void setLastDate(long lastDate) {
		this.lastDate = lastDate;
	}

	/**
	 * @return the randomKey
	 */
	public long getRandomKey() {
		return randomKey;
	}

	/**
	 * @return the className
	 */
	public T getClazz() {
		return clazz;
	}

	/**
	 * @return the pKey
	 */
	public String getPKey() {
		return pKey;
	}


	
}
